package hz

import scala.collection.mutable.ArrayBuffer

/**
  * Created by hz on 2016/12/19.
  */
object hh {
  def main(args:Array[String]): Unit ={

    var h="id=ArrayOS time=\"2016-12-13 19:13:13\" timezone=CST(+0900) fw=CJIS-VPN1150-2 pri=7 vpn=Site-OA user=zhangzhensn sport=23553 dst=10.60.18.44 dport=8080 type=vpn msg=\"clientapp: opened a new connection to backend 10.60.18.44:80.\"";
    val exp="""([\w]+)=([\w]+[-(\+]?[\S]+)""".r
    val re=exp.findAllIn(h)
    var ab=ArrayBuffer[String]()
    for (i <- re){
      ab+=i
    }

    val exp1="""([\w]+)=\"([^\"]*)\"""".r
    val re1=exp1.findAllIn(h)
    for (j <- re1){
     ab+=j
    }

  }

}
